package com.jic.member.enums;

/**
 * @author yinmenghui
 *  赠送类型比对
 */

public enum MODE_CODE {
    ORDER("1","下单赠送"),
    GIVE("2","注册赠送"),
    EVALUATE("3","评价赠送"),
    RECHARGE("4","充值赠送"),
    SHARE("5","分享赠送"),
    PRAISE("6","点赞赠送"),
    SUN("7","嗮单赠送"),
    COLLECTION("8","收藏赠送"),
    HOLD("9","参与平台活动"),
    JOIN("10","发布活动"),

    ;
    private String code;
    private String message;

    MODE_CODE(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public static MODE_CODE getByCode(String code) {
        MODE_CODE[] values = MODE_CODE.values();
        for (MODE_CODE value : values) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}